import request from '@/utils/request'
export const getEnterpriseListAPI = (params) => request('/park/enterprise', {
  params
})
export const getIndustryListAPI = () => request('/park/industry')
export const uploadAPI = (data) => request.post('upload', data)
export const createEnterpriseAPI = (data) => request.post('/park/enterprise', data)
export const getEnterpriseDetailAPI = (id) => request(`/park/enterprise/${id}`)

export const updateEnterpriseAPI = (data) => request.put('/park/enterprise', data)
export const delEnterpriseAPI = (id) => request.delete(`/park/enterprise/${id}`)

export const getRentBuildListAPI = () => request('/park/rent/building')

export const getRentListAPI = (id) => request(`/park/enterprise/rent/${id}`)

export const createRentAPI = (data) => request.post('/park/enterprise/rent', data)

export const outRentAPI = (rentId) => request.put(`/park/enterprise/rent/${rentId}`)

export function downloadContractAPI(id) {
  return request(`/download/${id}`, {
    responseType: 'blob'
  })
}
